package com.app.util.limiter;

public class Test {

	public static void main(String[] args) throws InterruptedException {
		LimitNames limitNames = new LimitNames();
		limitNames.addName("a");
		limitNames.addName("b");
		limitNames.addName("c");
		limitNames.addName("d");
		
		limitNames.addName("e");

		LimitMaxs limitMaxs = new LimitMaxs(limitNames);
		limitMaxs.setMax("a", 600);

		RateLimiter limiter = new RateLimiter(limitNames, 60);

		for (int i = 0; i < 100000; i++) {
			Thread.sleep(100);
			System.out.println(limiter.incr("a", limitMaxs));
		}

	}
}
 